package com.example.cricketscorer.client.widget.impl;

import com.example.cricketscorer.client.widget.interfaces.ITable;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.user.client.ui.FlexTable;

public class MyTable extends FlexTable implements ITable {

	public void selectRow( int row ) {
		getRowFormatter().addStyleName( row, "selected" );

	}

	public void unSelectRow( int row ) {
		getRowFormatter().removeStyleName( row, "selected" );
	}

	public int getRowForEvent( ClickEvent event ) {
		return getCellForEvent( event ).getRowIndex();
	}

}
